home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 January / macformat46.iso / Shareware Plus / Developers / Library / Grant's CGI Framework / Grant's CGI Framework / grantscgi / Util / globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-20  |  2.7 KB  |  122 lines

  1. #pragma once
  2. /*****
  3.  *
  4.  *    globals.h
  5.  *
  6.  *    This is a support file for "Grant's CGI Framework".
  7.  *    Please see the license agreement that accompanies the distribution package
  8.  *    for licensing details.
  9.  *
  10.  *    Copyright ©1995,1996 by Grant Neufeld
  11.  *    grant@acm.com
  12.  *    http://arpp.carleton.ca/cgi/framework/
  13.  *
  14.  *****/
  15.  
  16. #include "MyConfiguration.h"
  17.  
  18. #include <Threads.h>
  19.  
  20.  
  21. /***  GLOBAL DECLARATIONS  ***/
  22.  
  23. #ifdef __MainSegment__
  24.     #define    _GLOBAL_    /* local */
  25. #else
  26.     #define    _GLOBAL_    extern
  27. #endif
  28.  
  29. /** QUICKDRAW **/
  30.  
  31. /* Symantec C++ for PPC requires qd to be defined */
  32. #ifndef qd
  33.     #ifdef __SC__
  34.         #ifdef __powerc
  35.         _GLOBAL_    QDGlobals    qd;
  36.         #endif
  37.     #endif
  38. #endif
  39.  
  40.  
  41. /** MEMORY **/
  42.  
  43. /* handle to emergency memory reserve. Used in MemoryFunc.c. IM-Memory 1-46 */
  44. _GLOBAL_    Handle        gEmergencyMemory;
  45.  
  46.  
  47. /** PROCESS **/
  48.  
  49. _GLOBAL_    Boolean        gQuit;            /* application is set to quit */
  50. _GLOBAL_    Boolean        gFrontProcess;    /* application is in the foreground */
  51. _GLOBAL_    long        gSleepTicks;    /* sleep time for WaitNextEvent | threads when app is idle */
  52. //moved to ProcessUtil.c: _GLOBAL_    long    gSleepTicksBusy;/* sleep time for WaitNextEvent | threads when app is processing */
  53. #if kCompileWithProcessFileSpec
  54. _GLOBAL_    FSSpec        gProcessFSSpec;    /* the FSSpec for the application */
  55. #endif
  56. _GLOBAL_    SInt16        gAppFileRef;    /* file reference to the application resource fork */
  57.  
  58. /**  THREADS **/
  59.  
  60. _GLOBAL_    Boolean        gThreadQuit;    /* threads should quit now */
  61. //•moved to vThreadMain in"ProcessUtil.c"
  62. //_GLOBAL_    ThreadID    gThreadMain;    /* main application thread id */
  63. _GLOBAL_    short        gThreadTotal;    /* # of threads other than main */
  64.  
  65. /**  IDLE TIME QUIT  **/
  66.  
  67. #if kCompileWithQuitOnLongIdle
  68. _GLOBAL_    long        gTimeLastAction;/* the time in ticks of the last action performed */
  69. _GLOBAL_    Boolean        gDoIdleQuit;    /* whether to quit after period of inactivity */
  70. _GLOBAL_    long        gIdleTimeToQuit;/* idle time needed until quit set */
  71. _GLOBAL_    Boolean        gDoIdleQuitOnOpenApp; /* quit on idle after open app */
  72. #endif
  73.  
  74. /**  APPLE EVENTS  **/
  75.  
  76. _GLOBAL_    AEIdleUPP    gAEIdleUPP;
  77.  
  78.  
  79. /* SCREEN RECTS */
  80.  
  81. #if kCompileWithForeground
  82. _GLOBAL_    Rect        gScreenRect;    /* main monitor */
  83. _GLOBAL_    Rect        gGrayRgnRect;    /* entire screen */
  84. #endif
  85.  
  86.  
  87. /* STRINGS */
  88.  
  89. _GLOBAL_    Str255        gVersionStr;
  90.  
  91.  
  92. /* ERRORS */
  93.  
  94. _GLOBAL_    StringHandle    gSystemErrorStr;
  95.  
  96.  
  97. /* TOOLBOX MANAGERS AND FUNCTION CALLS AVAILABLE */
  98.  
  99. #if kCompileWithDragNDrop && kCompileWithForeground
  100. _GLOBAL_    Boolean        gHasDragNDrop;    /* Drag Manager present */
  101. #endif
  102. #if kCompileWithThreadsOptional
  103. _GLOBAL_    Boolean        gHasThreadMgr;    /* Thread Manager present */
  104. #endif
  105. #if kCompileWithForeground
  106. _GLOBAL_    Boolean        gHasColorQD;    /* Color QuickDraw present */
  107. #endif
  108.  
  109. /* PROFILER (CodeWarrior) */
  110.  
  111. #if __profile__ && __MWERKS__
  112. _GLOBAL_    Boolean        gProfileOn;
  113. #endif
  114.  
  115.  
  116.  
  117. #ifdef _GLOBAL_
  118.     #undef _GLOBAL_
  119. #endif
  120.  
  121. /***** EOF *****/
  122.